package com.carkeeper.pojo;


import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Document(indexName = "tweetinfo", type = "docs")
public class TweetInfo {

    //文章id
    @Id
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String id;

    //文章名称
    @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
    private String name;


    //标题图片
    @Field(index = false, store = true, type = FieldType.Keyword)
    private String image;

    //文章分类  配件 服务
    @Field(index = false, store = true, type = FieldType.Keyword)
    private String category;
    //一级分类
    @Field(index = false, store = true, type = FieldType.Keyword)
    private String category1;

    //二级分类
    @Field(index = false, store = true, type = FieldType.Keyword)
    private String category2;


    //推文内容
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String content;
    @Field(index = true, store = true, type = FieldType.Date)
    private Date createTime;

    @Field(index = true, store = true, type = FieldType.Date)
    private Date updateTime;

    public TweetInfo() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getCategory1() {
        return category1;
    }

    public void setCategory1(String category1) {
        this.category1 = category1;
    }

    public String getCategory2() {
        return category2;
    }

    public void setCategory2(String category2) {
        this.category2 = category2;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
